Referring to FIG. 1, a diagram is shown illustrating divisions of a video frame 10 in accordance with the MPEG-4 part 10 advanced video coding (AVC) standard. The MPEG-4 part 10 standard defines a method for video compression that operates on rectangular groups of pixels. The type of compression performed by the MPEG-4 part 10 AVC standard is generally referred to as “block-based” compression. Each frame 10 of video is divided into a number of macroblocks 12. Each of the macroblocks 12 is further divided into transform blocks 14. The transform blocks 14 can also be referred to as sub-blocks.
As part of the video compression process, a prediction for the pixels in each macroblock 12 is generated based upon either (i) pixels from adjacent macroblocks 12 in the same frame 10 or (ii) pixels from previous frames in the video sequence. Differences between the prediction and the actual pixel values for the macroblock 12 are referred to as residual values (or just residuals). The residual values for each transform block 14 are converted from spatial-domain to frequency-domain coefficients. The frequency-domain coefficients are then divided down to reduce the range of values needed to represent the frequency-domain coefficients through a process known as quantization. Quantization allows much higher compression ratios, but at the cost of discarding information about the original video sequence. Once the data has been quantized, the frames of the original sequence can no longer be reconstructed exactly.
The quantized coefficients and a description of how to generate the macroblock prediction pixel values constitute the compressed video stream. When video frames are reconstructed from the compressed stream, the compression sequence is reversed. The coefficients for each transform block 14 are converted back to spatial residuals. A prediction for each macroblock is generated based on the description in the stream and added to the residuals to reconstruct the pixels for the macroblock. Because of the information lost in quantization, however, the reconstructed pixels differ from the original ones. One of the goals of video compression is to minimize the perceived differences as much as possible for a given compression ratio.
In block-based video compression the differences in the reconstructed images tend to be most obvious at the edges of the macroblocks 12 and the transform blocks 14. Because the blocks are compressed and reconstructed separately, errors tend to accumulate differently on each side of block boundaries and can produce a noticeable seam. To counteract the production of a noticeable seam, the MPEG-4 part 10 video compression standard includes a deblocking filter.
A definition of the deblocking filter can be found in Section 8.7 of the MPEG-4 part 10 video compression standard. The deblocking filter blends pixel values across macroblock and transform block edges in the reconstructed frames to reduce the discontinuities that result from quantization. Filtering takes place as part of both the compression and decompression processes. Filtering is performed after the video frames are reconstructed, but before the reconstructed frames are used to predict macroblocks in other frames. Because filtered frames are used for prediction, the filtering process must be exactly the same during compression and decompression or errors will accumulate in the decompressed video frames.
The definition of the deblocking filter in the MPEG-4 part 10 specification specifies that macroblocks are filtered in raster order (i.e., from left to right and top to bottom of the video frame). Because the macroblocks are filtered in raster order, the inputs to the deblocking filter include pixels that were already filtered as part of a previous macroblock. The inclusion of already filtered pixels as inputs to the deblocking filter implies sequential processing of the macroblocks in a frame in the specified raster order. The MPEG-4 part 10 deblocking filter improves both the perceived quality of the reconstructed image and the compression ratio, but requires additional processing. When performed sequentially, the deblocking filter processing can significantly increase the time required to encode and decode each frame.
It would be desirable to filter an arbitrary number of macroblock-size areas in a single video frame at the same time to reduce the time required to filter the frame.